package com.ruoyi.assest.controller;

import com.ruoyi.assest.service.IAssetSortService;
import com.ruoyi.assest.service.IndexService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.ruoyi.common.core.domain.AjaxResult.success;

/**
 * @description:
 * @author:瓦达西瓦
 * @date:2024/12/3
 */
@RestController
@RequestMapping("/index/index")
public class IndexController {
@Autowired
private IndexService indexService;
@Autowired

private IAssetSortService assetSortService;


    @PreAuthorize("@ss.hasPermi('index:index:Ylist')")
    @GetMapping("/Ylist")
    public AjaxResult getYlist()
    {
        List<Double> list = indexService.getYlist();
        return success(list);
    }

    @PreAuthorize("@ss.hasPermi('index:index:Jlist')")
    @GetMapping("/Jlist")
    public AjaxResult getJlist()
    {
        List<Double> list = indexService.getJlist();
        return success(list);
    }

    @PreAuthorize("@ss.hasPermi('index:index:Zailist')")
    @GetMapping("/Zailist")
    public AjaxResult getZailist()
    {
        List<Long> list = indexService.getZailist();
        System.out.println("999999"+list);
        return success(list);
    }
    @PreAuthorize("@ss.hasPermi('index:index:Xzlist')")
    @GetMapping("/Xzlist")
    public AjaxResult getXzlist()
    {
        List<Long> list = indexService.getXzlist();
        System.out.println("999999"+list);
        return success(list);
    }

    @PreAuthorize("@ss.hasPermi('index:index:Dbflist')")
    @GetMapping("/Dbflist")
    public AjaxResult getDbflist()
    {
        List<Long> list = indexService.getDbflist();
        System.out.println("999999"+list);
        return success(list);
    }

    @PreAuthorize("@ss.hasPermi('index:index:Dqylist')")
    @GetMapping("/Dqylist")
    public AjaxResult getDqylist()
    {
        List<Long> list = indexService.getDqylist();
        System.out.println("999999"+list);
        return success(list);
    }

    @PreAuthorize("@ss.hasPermi('index:index:Dbslist')")
    @GetMapping("/Dbslist")
    public AjaxResult getDbslist()
    {
        List<Long> list = indexService.getDbslist();
        System.out.println("999999"+list);
        return success(list);
    }
}
